import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_layout/main/base_stateful_widget.dart';

class AppbarPage extends BaseStatefulWidget {
  const AppbarPage({Key? key}) : super(key: key);

  @override
  _AppbarPageState createState() => _AppbarPageState();
}

class _AppbarPageState extends State<AppbarPage> implements TickerProvider {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        // automaticallyImplyLeading: false,
        elevation: 0,
        iconTheme: const IconThemeData(size: 24),
        actionsIconTheme: const IconThemeData(size: 28),
        // textTheme: TextDa,
        // toolbarTextStyle: TextStyle(color: Colors.green),
        // titleTextStyle: TextStyle(color: Colors.blue),
        centerTitle: true,
        title: Text( widget.runtimeType.toString()),
        bottom: TabBar(
          tabs: const [
            Tab(
              text: "首页",
              // icon: Icon(Icons.add),
            ),
            Tab(
              text: "广场",
              // icon: Icon(Icons.add),
            ),
            Tab(
              text: "消息",
              // icon: Icon(Icons.add),
            ),
            Tab(
              text: "我的",
              // icon: Icon(Icons.add),
            ),
          ],
          controller: TabController(initialIndex: 0, length: 4, vsync: this),
        ),

        // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
        // backgroundColor: Colors.red,
      ),
      body: Container(),
      drawer: const Drawer(),
    );
  }

  @override
  Ticker createTicker(TickerCallback onTick) {
    return Ticker(onTick);
  }
}
